let aa=document.querySelector(".aa");
let bb=document.querySelector(".bb");
let cc=document.querySelector(".cc");
let token=localStorage.getItem("token");
console.log(aa)
let moreApi="http://15637237221.wicp.vip/yh/HomePage/comprehensiveCourseSys.do";
axios.post(moreApi,{
	"token":"token", //用户token
	"pageNum":1, //当前页码，默认1
	"pageSize":10 //每页条数，默认10
})
.then(res=>{
	console.log(res.data.info);
// courseSysId: "2"
// courseSysImgUrl: "http://15637237221.wicp.vip/show/test.jpg"
// courseSysName: "系列2"
// courseSysUpdateTime: "2019-10-04T06:27:07.000+0000"
// courseSysWatchNumber: 500
// teacher: {userId: "2", id: "2", username: "十", password: "123456", phone: "12123456788", …}
// teacherUserId: "2"
	let html=res.data.info.map(v=>`
	<div class="main2">
		<a href="">
			<img src="${v.courseSysImgUrl}">
		</a>
		<div class="m-bottom">
			<h3>${v.courseSysName}</h3>
			<div class="mm">
				<span>导师:${v.teacher.username}</span>
				<span>${v.courseSysWatchNumber}人已购</span>
			</div>
		</div>
	</div>
	`).join("");
	console.log(html)
	aa.innerHTML=html;
})

//热门  /HomePage/hottestCourseSys.do
let moreApi2="http://15637237221.wicp.vip/yh/HomePage/hottestCourseSys.do";
axios.post(moreApi2,{
	"token":"token", //用户token
	"pageNum":1, //当前页码，默认1
	"pageSize":10 //每页条数，默认10
})
.then(res=>{
	console.log(res.data.info);
	// courseSysId: "1"
	// courseSysName: "系列1"
	// courseSysUpdateTime: "2019-10-03T06:26:56.000+0000"
	// courseSysWatchNumber: 400
	let html=res.data.info.map(v=>`
	
	<div class="main2">
		<a href="">
			<img src="${v.courseSysImgUrl}">
		</a>
		<div class="m-bottom">
			<h3>${v.courseSysName}</h3>
			<div class="mm">
				<span>导师:${v.teacher.username}</span>
				<span>${v.courseSysWatchNumber}人已购</span>
			</div>
		</div>
	</div>
	`).join("");
	console.log(html)
	bb.innerHTML=html;
})

//新增
let moreApi3="http://15637237221.wicp.vip/yh/HomePage/latestCourseSys.do";
axios.post(moreApi3,{
	"token":"token", //用户token
	"pageNum":1, //当前页码，默认1
	"pageSize":10 //每页条数，默认10
})
.then(res=>{
	console.log(res.data.info);
	// courseSysId: "1"
	// courseSysName: "系列1"
	// courseSysUpdateTime: "2019-10-03T06:26:56.000+0000"
	// courseSysWatchNumber: 400
	let html=res.data.info.map(v=>`
	
	<div class="main2">
		<a href="">
			<img src="${v.courseSysImgUrl}">
		</a>
		<div class="m-bottom">
			<h3>${v.courseSysName}</h3>
			<div class="mm">
				<span>导师:${v.teacher.username}</span>
				<span>${v.courseSysWatchNumber}人已购</span>
			</div>
		</div>
	</div>
	`).join("");
	console.log(html)
	cc.innerHTML=html;
})

